package handler

type Admin struct {
	Username string `XORM:"VARCHAR(255) NOT NULL DEFAULT ''" param:"<in:formData><required><len:4:20>"`
	Password string `XORM:"VARCHAR(255) NOT NULL DEFAULT ''" param:"<in:formData><required><len:4:20>"`
	Email    string `XORM:"VARCHAR(255) NULL"`
}

type Staff struct {
	Id          int64  `param:"<in:formData>"`
	Username    string `XORM:"VARCHAR(255) NOT NULL" param:"<in:formData>"`
	Password    string `XORM:"VARCHAR(255) NOT NULL" param:"<in:formData>"`
	Phone       int64  `XORM:"INT(11) NULL" param:"<in:formData>"`
	Ident       string `XORM:"VARCHAR(18) NOT NULL" param:"<in:formData>"`
	Type        int    `XORM:"TINYINT(2) DEFAULT 1" param:"<in:formData>"`
	Reap        int    `XORM:"INT(11)" param:"<in:formData>"`
	Status      int    `xorm:"TINYINT(2)" param:"<in:formData>"`
	Sex         int    `xorm:"TINYINT(2) DEFAULT '1'" param:"<in:formData>"`
	Create_time string `XORM:"TIMESTAMP DEFAULT 'CURRENT_TIMESTAMP'"`
	Option      string `param:"<in:formData><required><len:3:3>"`
	Own         int    `xorm:"TINYINT(2) DEFAULT '1'" param:"<in:formData>"`
	Qq          string `XORM:"VARCHAR(13) NOT NULL" param:"<in:formData>"`
}

type Email struct {
	Id          int64  `param:"<in:formData>"`
	Sid         int    `xorm:"int(11) NOT NULL DEFAULT" param:"<in:formData>"`
	Rid         int    `xorm:"int(11) NOT NULL DEFAULT" param:"<in:formData>"`
	Type         int    `xorm:"int(11) NOT NULL DEFAULT" param:"<in:formData>"`
	Sname       string `xorm:"varchar(255) NULL DEFAULT" param:"<in:formData>"`
	Title       string `xorm:"varchar(255) NULL DEFAULT" param:"<in:formData>"`
	Content     string `xorm:"varchar(255) NULL DEFAULT" param:"<in:formData>"`
	State       int    `xorm:"tinyint(2) DEFAULT 1" param:"<in:formData>"` //1为未审核请求 2为已审核请求 - 只对管理员起作用
	Read        int    `xorm:"tinyint(2) DEFAULT 1" param:"<in:formData>"` //1为用户未读 2为用户已读 - 只对用户起作用
	Result      int    `xorm:"tinyint(2)" param:"<in:formData>"`           //1为同意 2为拒绝
	Create_time string `XORM:"TIMESTAMP DEFAULT 'CURRENT_TIMESTAMP'"`
}

type Reply struct {
	Id          int64  `param:"<in:formData>"`
	Sid         int    `xorm:"int(11) NOT NULL DEFAULT" param:"<in:formData>"`
	Sname       string `xorm:"varchar(255) NULL DEFAULT" param:"<in:formData>"`
	Content     string `xorm:"varchar(255) NULL DEFAULT" param:"<in:formData>"`
	Read        int    `xorm:"tinyint(2) DEFAULT 1" param:"<in:formData>"` //1为用户未读 2为用户已读 - 只对用户起作用
	Reply       string `xorm:"varchar(255) NULL DEFAULT" param:"<in:formData>"`
	Create_time string `XORM:"TIMESTAMP DEFAULT 'CURRENT_TIMESTAMP'"`
}

type News struct {
	Id          int64  `param:"<in:formData>"`
	Title       string `xorm:"varchar(255) NULL DEFAULT" param:"<in:formData>"`
	Content     string `xorm:"varchar(255) NULL DEFAULT" param:"<in:formData>"`
	Author      string `xorm:"varchar(255) NULL DEFAULT" param:"<in:formData>"`
	Create_time string `XORM:"TIMESTAMP DEFAULT 'CURRENT_TIMESTAMP'"`
	Status      int    `XORM:"tinyint(2) DEFAULT 1" param:"<in:formData>"`
	Option      string `param:"<in:formData><required><len:3:3>"`
	Type        int    `XORM:"TINYINT(2) DEFAULT 1" param:"<in:formData>"`
}

type Rc struct {
	Id      int64  `param:"<in:formData>"`
	Title   string `xorm:"varchar(255) NULL DEFAULT" param:"<in:formData>"`
	Content string `xorm:"varchar(255) NULL DEFAULT" param:"<in:formData>"`
	Status  int    `XORM:"tinyint(2) DEFAULT 0" param:"<in:formData>"`
}
